package com.lyz.myself.service;

import com.github.pagehelper.PageInfo;
import com.lyz.myself.pojo.Po.Position;
import com.lyz.myself.pojo.Po.Role;
import com.lyz.myself.pojo.Po.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserService{
    User getUserByCompany(String userName,Integer company_id);
    User getUser(String userName);
    List<Role> getRole(Integer user_id);
    String getPassword(String userName);
    PageInfo<User> getAll(int pageNum, int pageSize);
    List<Position> getPosition(Integer position_id);
    User selectByPrimaryKey(Integer user_id);
    PageInfo<Map<String,String>> getAllUser(Integer company_id ,int pageNum, int pageSize);
    Map<String,String> fidMeInformation(Integer user_id,Integer company_id );
    PageInfo<Map<String,String>> myUser(Integer company_id,int pageNum, int pageSize);
    Integer insertSelective(User user);
    Integer updateByPrimaryKeySelective(User user);
    /**
     * 维达绑定crm账号
     * @param map
     * @return
     */
    Integer bindTheUser(Map<String,Object> map);

    /**
     * 通过维达账号判断是否绑定
     * @param vaderName
     * @return
     */
    User findTheUser(String vaderName);


    /**
     * 删除超级管理员
     * @param list
     * @return
     */
    boolean deleteAdmin(List<Integer> list);

    /**
     * 查询role_id
     * @param  user_id
     * @return
     */
    Map<String,Object> getUserRoleId(String user_id);

    /**
     * 解绑维达账号
     * @param userId
     * @return
     */
    String unbundlingUser(Integer userId);
}
